{include 'header.tpl'}
<div class="contant">

    <form name="myForm"><input id="string_x" type="hidden" name="myHidden" value="{$string_x}"/><input id="string_y" type="hidden" name="province" value="{$string_y}"/></form>

    <div id="allmap" style="width: 100%;height: 500px;"></div>

    {*<div class="loc">*}
        {*<div class="loc_tlt">附近地址</div>*}
        {*<div class="loc_list">*}
            {*<ul id="wordMap">*}
                {*<li><a>麓谷企业广场C4</a></li>*}
                {*<li><a>麓谷企业广场C4</a></li>*}
                {*<li><a>麓谷企业广场C4</a></li>*}
            {*</ul>*}
        {*</div>*}
    {*</div>*}
</div>
<script type="application/javascript" src="/mall/js/lib.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="application/javascript" src='http://api.map.baidu.com/api?v=2.0&ak=pRtqXqnajTytAzWDL3HOnPRK'></script>

{literal}

    <script>
        //delCookie('_base');
        //获取当前位置
        function getQueryString(queryname) {
            var qKeys = { };
            var re = /[?&]([^=]+)(?:=([^&]*))?/g;
            var matchInfo;
            while (matchInfo = re.exec(location.search)) {
                qKeys[matchInfo[1]] = matchInfo[2];
            }
            return typeof (qKeys[queryname]) == 'undefined' ? '0' : qKeys[queryname];
        }

        var string_x=getQueryString('x');
        var string_y=getQueryString('y');

        var map = new BMap.Map("allmap");
        map.centerAndZoom(new BMap.Point(string_x,string_y),16);
        map.enableScrollWheelZoom(true);

        // 用经纬度设置地图中心点
        function theLocation(){
            if(string_x != "" && string_y != ""){
                map.clearOverlays();
                var new_point = new BMap.Point(string_x,string_y);
                var marker = new BMap.Marker(new_point);  // 创建标注
                map.addOverlay(marker);              // 将标注添加到地图中
                map.panTo(new_point);
            }
        }

        theLocation();



    </script>
{/literal}
{include 'footer.tpl'}